<?php

namespace App\Providers;

use App\Http\Helper\CrontabFile;
use App\Model\CronModel;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\ServiceProvider;


class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        //
//        CronModel::saved(function (){CrontabFile::write_file();});
        CronModel::deleted(function (){CrontabFile::write_file();});
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
